Optimal. Leaf size=50 \[ \frac {a (c+d x)^2}{2 d}+\frac {i a (c+d x) \cosh (e+f x)}{f}-\frac {i a d \sinh (e+f x)}{f^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 50, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {3398, 3377,
2717} \begin {gather*} \frac {i a (c+d x) \cosh (e+f x)}{f}+\frac {a (c+d x)^2}{2 d}-\frac {i a d \sinh (e+f x)}{f^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2717
Rule 3377
Rule 3398
Rubi steps
\begin {align*} \int (c+d x) (a+i a \sinh (e+f x)) \, dx &=\int (a (c+d x)+i a (c+d x) \sinh (e+f x)) \, dx\\ &=\frac {a (c+d x)^2}{2 d}+(i a) \int (c+d x) \sinh (e+f x) \, dx\\ &=\frac {a (c+d x)^2}{2 d}+\frac {i a (c+d x) \cosh (e+f x)}{f}-\frac {(i a d) \int \cosh (e+f x) \, dx}{f}\\ &=\frac {a (c+d x)^2}{2 d}+\frac {i a (c+d x) \cosh (e+f x)}{f}-\frac {i a d \sinh (e+f x)}{f^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.08, size = 48, normalized size = 0.96 \begin {gather*} \frac {a \left (f^2 x (2 c+d x)+2 i f (c+d x) \cosh (e+f x)-2 i d \sinh (e+f x)\right )}{2 f^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 95 vs. \(2 (46 ) = 92\).
time = 0.38, size = 96, normalized size = 1.92
method | result | size |
risch | \(\frac {a d \,x^{2}}{2}+a c x +\frac {i a \left (d x f +c f -d \right ) {\mathrm e}^{f x +e}}{2 f^{2}}+\frac {i a \left (d x f +c f +d \right ) {\mathrm e}^{-f x -e}}{2 f^{2}}\) | \(62\) |
derivativedivides | \(\frac {\frac {d a \left (f x +e \right )^{2}}{2 f}+\frac {i d a \left (\left (f x +e \right ) \cosh \left (f x +e \right )-\sinh \left (f x +e \right )\right )}{f}-\frac {d e a \left (f x +e \right )}{f}-\frac {i d e a \cosh \left (f x +e \right )}{f}+a c \left (f x +e \right )+i a c \cosh \left (f x +e \right )}{f}\) | \(96\) |
default | \(\frac {\frac {d a \left (f x +e \right )^{2}}{2 f}+\frac {i d a \left (\left (f x +e \right ) \cosh \left (f x +e \right )-\sinh \left (f x +e \right )\right )}{f}-\frac {d e a \left (f x +e \right )}{f}-\frac {i d e a \cosh \left (f x +e \right )}{f}+a c \left (f x +e \right )+i a c \cosh \left (f x +e \right )}{f}\) | \(96\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 70, normalized size = 1.40 \begin {gather*} \frac {1}{2} \, a d x^{2} + a c x + \frac {1}{2} i \, a d {\left (\frac {{\left (f x e^{e} - e^{e}\right )} e^{\left (f x\right )}}{f^{2}} + \frac {{\left (f x + 1\right )} e^{\left (-f x - e\right )}}{f^{2}}\right )} + \frac {i \, a c \cosh \left (f x + e\right )}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.34, size = 84, normalized size = 1.68 \begin {gather*} \frac {{\left (i \, a d f x + i \, a c f + i \, a d + {\left (i \, a d f x + i \, a c f - i \, a d\right )} e^{\left (2 \, f x + 2 \, e\right )} + {\left (a d f^{2} x^{2} + 2 \, a c f^{2} x\right )} e^{\left (f x + e\right )}\right )} e^{\left (-f x - e\right )}}{2 \, f^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.20, size = 162, normalized size = 3.24 \begin {gather*} a c x + \frac {a d x^{2}}{2} + \begin {cases} \frac {\left (\left (2 i a c f^{3} + 2 i a d f^{3} x + 2 i a d f^{2}\right ) e^{- f x} + \left (2 i a c f^{3} e^{2 e} + 2 i a d f^{3} x e^{2 e} - 2 i a d f^{2} e^{2 e}\right ) e^{f x}\right ) e^{- e}}{4 f^{4}} & \text {for}\: f^{4} e^{e} \neq 0 \\\frac {x^{2} \left (i a d e^{2 e} - i a d\right ) e^{- e}}{4} + \frac {x \left (i a c e^{2 e} - i a c\right ) e^{- e}}{2} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.43, size = 69, normalized size = 1.38 \begin {gather*} \frac {1}{2} \, a d x^{2} + a c x - \frac {{\left (-i \, a d f x - i \, a c f + i \, a d\right )} e^{\left (f x + e\right )}}{2 \, f^{2}} - \frac {{\left (-i \, a d f x - i \, a c f - i \, a d\right )} e^{\left (-f x - e\right )}}{2 \, f^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.12, size = 56, normalized size = 1.12 \begin {gather*} \frac {\frac {a\,f\,\left (c\,\mathrm {cosh}\left (e+f\,x\right )\,2{}\mathrm {i}+d\,x\,\mathrm {cosh}\left (e+f\,x\right )\,2{}\mathrm {i}\right )}{2}-a\,d\,\mathrm {sinh}\left (e+f\,x\right )\,1{}\mathrm {i}}{f^2}+\frac {a\,\left (d\,x^2+2\,c\,x\right )}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________